package ysq.xyg.model;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 购物车
 *
 * @author congcong tao
 * @date 2018/8/9 16:10
 */
@Table(name = "yyg_cart")
public class Cart implements Serializable {

    @Id
    private String id;

    @Column(name = "member_id")
    private String memberId;

    @Column(name = "item_id")
    private String itemId;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    @Transient
    private Item item;

    @Transient
    private int totalNum;

    @Transient
    private int readyNum;

    /**
     * 最新的活动的id
     */
    @Transient
    private String activityId;

    /**
     * 期数,进行了多少期
     */
    @Transient
    private int periodsNum;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public String getItemId() {
        return itemId;
    }

    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Item getItem() {
        return item;
    }

    public void setItem(Item item) {
        this.item = item;
    }

    public int getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(int totalNum) {
        this.totalNum = totalNum;
    }

    public int getReadyNum() {
        return readyNum;
    }

    public void setReadyNum(int readyNum) {
        this.readyNum = readyNum;
    }

    public String getActivityId() {
        return activityId;
    }

    public void setActivityId(String activityId) {
        this.activityId = activityId;
    }

    public int getPeriodsNum() {
        return periodsNum;
    }

    public void setPeriodsNum(int periodsNum) {
        this.periodsNum = periodsNum;
    }
}